package com.ys.fmms.compare;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person implements Comparable<Person> {
    private Integer id;
    private Integer age;
    private String name;

    @Override
    public int compareTo(Person o) {
        return this.getAge() - o.getAge();
    }
}
